// import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

//引入初始化样式文件
import '@/styles/common.scss'

//测试接口函数
/* import { getCategory } from '@/apis/testAPI'
getCategory().then(res => {
  console.log((res));
}) */

const app = createApp(App)

// 全局指令注册，引入懒加载指令插件并注册
import { lazyPlugin } from '@/directives'
app.use(lazyPlugin)

//全局组件插件
import { componentPlugin } from '@/components'
app.use(componentPlugin)

//pinia持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)


app.use(router)

app.mount('#app')
